import pathBrowserify from "path-browserify";

export const PathUtils = {
  /**
   * 获取名字
   * @param path
   */
  getFileNameNoExt(path: string): string {
    let extname = pathBrowserify.extname(path);
    let basename = pathBrowserify.basename(path, extname);
    return basename;
  },
  /**
   * 获取扩展名，带有.
   * @param path
   */
  extName(path: string): string {
    return pathBrowserify.extname(path)
  },
  resolve(...paths: string[]): string {
    return pathBrowserify.resolve(...paths)
  }
}
